Skip to content

release: 0.39.0#94

Open
stainless-app[bot] wants to merge 37 commits into
mainfrom
release-please--branches--main--changes--next--components--hyperspell
Open

release: 0.39.0#94
stainless-app[bot] wants to merge 37 commits into
mainfrom
release-please--branches--main--changes--next--components--hyperspell

Conversation

@stainless-app
Copy link
Copy Markdown
Contributor

@stainless-app stainless-app Bot commented Apr 22, 2026

Automated Release PR

0.39.0 (2026-05-20)

Full Changelog: v0.38.0...v0.39.0

Features

Bug Fixes

  • typescript: upgrade tsc-multi so that it works with Node 26 (bb51450)

Chores

  • avoid formatting file that gets changed during releases (cf52108)
  • format: run eslint and prettier separately (43ec88d)
  • internal: codegen related update (f6cdc59)
  • internal: more robust bootstrap script (dd48b06)
  • internal: update docs ordering (9ac7b35)
  • redact api-key headers in debug logs (9ccb5ff)
  • restructure docs search code (8a752b4)
  • tests: remove redundant File import (1f3a018)
  • update SDK settings (5f5049a)

Documentation


This pull request is managed by Stainless's GitHub App.

The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.

For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.

🔗 Stainless website
📚 Read the docs
🙋 Reach out for help or questions

@stainless-app
Copy link
Copy Markdown
Contributor Author

stainless-app Bot commented Apr 22, 2026

🧪 Testing

To try out this version of the SDK:

npm install 'https://pkg.stainless.com/s/hyperspell-typescript/898829a0b4b42f4bd463aa8a4cf63fe6f29e57f2/dist.tar.gz'

Expires at: Fri, 19 Jun 2026 17:32:10 GMT
Updated at: Wed, 20 May 2026 17:32:10 GMT

@canaries-inc
Copy link
Copy Markdown

canaries-inc Bot commented Apr 22, 2026

🐤 Canary Summary

This is an automated release PR with no UI/UX changes:

  • Version bumped from 0.38.0 to 0.38.1 across all package files
  • Updated npm publishing workflow authentication from OIDC to token-based
  • Modified release scripts to use NPM_TOKEN environment variable
  • Updated changelog and configuration metadata
  • No user-facing UI components, styling, or application logic affected


View PR tests on Canary

@canaries-inc
Copy link
Copy Markdown

canaries-inc Bot commented Apr 22, 2026

🐤 Canary Proposed Tests

No testable user journeys found for this PR.

@entelligence-ai-pr-reviews
Copy link
Copy Markdown


Confidence Score: 5/5 - Safe to Merge

Safe to merge — this appears to be a standard release bump to version 0.38.1 with no identified logic, security, or correctness issues surfaced during review. The automated analysis found zero critical, significant, or medium-severity issues across the reviewed files. While only 4 of 13 changed files received coverage, the absence of any flagged concerns and the nature of a patch release (typically containing minor fixes or version metadata updates) supports a clean merge.

Key Findings:

  • No new review comments were generated, indicating no obvious logic bugs, security vulnerabilities, or correctness issues were detected in the analyzed code.
  • The PR is a patch release (0.38.1), which typically involves version string updates, changelog entries, and minor bug fixes rather than high-risk architectural changes.
  • Zero unresolved pre-existing comments were carried into this review, meaning there is no backlog of known issues being deferred.
  • 4 of 13 changed files were reviewed by the heuristic analysis — the unreviewed files represent a minor blind spot, but for a release PR this risk is generally low.

@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next--components--hyperspell branch from dcbda64 to 7fde307 Compare April 23, 2026 04:06
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next--components--hyperspell branch from 7fde307 to 983f201 Compare April 23, 2026 04:06
@entelligence-ai-pr-reviews
Copy link
Copy Markdown

entelligence-ai-pr-reviews Bot commented Apr 23, 2026

EntelligenceAI PR Summary

Release v0.39.0 expands integration support, hardens CI security, and refactors tooling configuration across the SDK.

  • Adds six new integration sources (granola, fathom, linear, hubspot, salesforce, coda) to union types in actions.ts, auth.ts, connections.ts, integrations.ts, web-crawler.ts, memories.ts, and shared.ts
  • Refactors MemorySearchParams.effort from number to 'minimal' | 'low' | 'medium' | 'high' string enum; adds recency_half_life_days and folder_ancestors optional fields
  • Adds HYPERSPELL_CUSTOM_HEADERS environment variable support in src/client.ts for injecting HTTP headers
  • Extends sensitive header redaction in src/internal/utils/log.ts to cover api-key and x-api-key
  • Pins all GitHub Actions to immutable commit SHAs in all three CI workflows; simplifies NPM publish to use NPM_TOKEN directly
  • Decouples Prettier from ESLint: removes eslint-plugin-prettier, adds prettier --check to lint script, updates format scripts
  • Upgrades tsc-multi from v1.1.9 to v1.1.11; adds .d.ts post-processing for @ts-ignore comment handling in postprocess-files.cjs
  • Updates MCP server embedded docs with reordered code examples, new schema fields, and enriched HTTP examples

Confidence Score: 2/5 - Changes Needed

Not safe to merge — this PR carries multiple unresolved reliability bugs across its CI/tooling changes. The newly flagged issue in bin/publish-npm removes the inline NPM_TOKEN guard so an empty or missing token is no longer caught before npm publish executes, which can silently fail or publish with wrong credentials. A pre-existing and still-unresolved bug in scripts/fast-format means $FILE_LIST is tested as a non-empty path string rather than its contents, causing prettier to hang when no files have changed. A second unresolved pre-existing issue in scripts/utils/postprocess-files.cjs documents that the ts-ignore string replacement alters character counts, which breaks generated declaration maps — a correctness problem for consumers of the SDK. The new integration sources and MemorySearchParams.effort enum refactor look well-scoped and low-risk, but the tooling/CI issues are substantive enough to block a clean release.

Key Findings:

  • bin/publish-npm no longer guards against an empty NPM_TOKEN before invoking npm publish, meaning a misconfigured CI environment could attempt a publish without valid credentials — a reliability and potential security concern for an automated release script.
  • In scripts/fast-format, the emptiness check tests the path variable $FILE_LIST (always a non-empty string) instead of the file's contents, so prettier will be invoked with an empty file list and hang indefinitely when no files changed.
  • In scripts/utils/postprocess-files.cjs, the ts-ignore comment replacement changes the byte/character count of processed files, invalidating source-map offsets in .d.ts.map declaration maps and breaking IDE go-to-definition for SDK consumers.
  • The union-type expansions in actions.ts, auth.ts, connections.ts, and related files appear additive and consistent, and the effort string-enum refactor is a straightforward type narrowing — these changes themselves carry low risk.
  • 2 previous unresolved comment(s) likely resolved in latest diff (score-only signal; thread status unchanged)
Files requiring special attention
  • bin/publish-npm
  • scripts/fast-format
  • scripts/utils/postprocess-files.cjs

@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next--components--hyperspell branch from 983f201 to 8dead0f Compare April 23, 2026 22:30
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next--components--hyperspell branch from 8dead0f to c890ae3 Compare April 24, 2026 18:30
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next--components--hyperspell branch from c890ae3 to 63c35fd Compare April 25, 2026 03:31
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next--components--hyperspell branch from 63c35fd to 479c910 Compare April 25, 2026 18:31
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next--components--hyperspell branch from 479c910 to f6c43d6 Compare April 25, 2026 20:31
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next--components--hyperspell branch from f6c43d6 to 6f3fbdd Compare April 26, 2026 02:31
@stainless-app stainless-app Bot changed the title release: 0.38.1 release: 0.39.0 Apr 26, 2026
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next--components--hyperspell branch from 6f3fbdd to 7e1e1c1 Compare April 26, 2026 02:31
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next--components--hyperspell branch from 7e1e1c1 to 705d4a6 Compare April 27, 2026 00:31
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next--components--hyperspell branch from 5e41d76 to bd4ac3c Compare May 8, 2026 03:31
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next--components--hyperspell branch from bd4ac3c to 3de92dd Compare May 8, 2026 05:11
Comment thread src/client.ts
Comment on lines +236 to +237
if (colon >= 0) {
parsed[line.substring(0, colon).trim()] = line.substring(colon + 1).trim();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Major: Empty header name allowed when line starts with colon — When colon === 0 (e.g. a line like : value), line.substring(0, 0).trim() is "", so an empty-string key is written into parsed and forwarded as a header. The guard should be colon > 0 to skip lines with no header name.

🤖 AI Agent Prompt for Cursor/Windsurf

📋 Copy this prompt to your AI coding assistant (Cursor, Windsurf, etc.) to get help fixing this issue

In src/client.ts at line 236, change `if (colon >= 0)` to `if (colon > 0)`. The current condition allows `colon === 0`, which means a line starting with `:` produces an empty-string header name (`line.substring(0, 0).trim() === ""`). This is an invalid HTTP header name. Changing to `colon > 0` skips such lines.

@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next--components--hyperspell branch from 3de92dd to f8182ef Compare May 8, 2026 17:31
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next--components--hyperspell branch from f8182ef to 9ea9d7d Compare May 8, 2026 18:32
Comment thread scripts/fast-format
echo "$PRETTIER_FILES" | xargs ./node_modules/.bin/prettier \
--write --cache --cache-strategy metadata --no-error-on-unmatched-pattern \
'!**/dist' '!**/*.ts' '!**/*.mts' '!**/*.cts' '!**/*.js' '!**/*.mjs' '!**/*.cjs'
if ! [ -z "$FILE_LIST" ]; then
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Major: Guard checks variable name, not file content — prettier hangs on empty file list$FILE_LIST holds a file path (e.g. /tmp/changed.txt), which is always a non-empty string after the validation at line 22, so this guard is always true. When FILE_LIST contains zero lines, cat "$FILE_LIST" | xargs prettier invokes prettier with no file arguments; GNU xargs runs the command once on empty stdin (without -r), causing prettier to block waiting on stdin. The eslint section correctly guards on the filtered content ($ESLINT_FILES), not the path variable.

🤖 AI Agent Prompt for Cursor/Windsurf

📋 Copy this prompt to your AI coding assistant (Cursor, Windsurf, etc.) to get help fixing this issue

In `scripts/fast-format`, line 34, the guard `if ! [ -z "$FILE_LIST" ]` incorrectly checks whether the variable holding the file path is non-empty (always true) instead of whether the file has any content. Change line 34 from:

  if ! [ -z "$FILE_LIST" ]; then

to:

  if [ -s "$FILE_LIST" ]; then

This mirrors how the eslint section avoids running the tool when there are no files to process, and prevents prettier from being invoked with no file arguments (which causes it to hang reading from stdin).

Pin all GitHub Actions referenced in generated workflows (both
first-party `actions/*` and third-party) to immutable commit SHAs.
Updating pinned actions is now a deliberate codegen-side bump rather
than implicit on every workflow run.
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next--components--hyperspell branch from 9ea9d7d to 53e88d4 Compare May 13, 2026 04:09
Comment thread scripts/fast-format
Comment on lines +34 to +35
if ! [ -z "$FILE_LIST" ]; then
cat "$FILE_LIST" | xargs ./node_modules/.bin/prettier \
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔧 Nit: Guard checks path variable instead of file contents, allowing prettier to hang on empty input$FILE_LIST is the path string, which is always non-empty here (the script exits earlier if the file is missing), so this guard never prevents prettier from running. When the file is empty (no changed files), cat "$FILE_LIST" | xargs prettier causes GNU xargs to invoke prettier with no file arguments, making it block on stdin.

🤖 AI Agent Prompt for Cursor/Windsurf

📋 Copy this prompt to your AI coding assistant (Cursor, Windsurf, etc.) to get help fixing this issue

In `scripts/fast-format`, lines 33–37, the prettier guard checks the path variable `$FILE_LIST` instead of the file contents. Replace the block:

if ! [ -z "$FILE_LIST" ]; then
cat "$FILE_LIST" | xargs ./node_modules/.bin/prettier
--write --cache --cache-strategy metadata --no-error-on-unmatched-pattern --ignore-unknown
fi

with a content-aware check, for example by adding `-r` to xargs to prevent running when stdin is empty:

if [ -s "$FILE_LIST" ]; then
cat "$FILE_LIST" | xargs -r ./node_modules/.bin/prettier
--write --cache --cache-strategy metadata --no-error-on-unmatched-pattern --ignore-unknown
fi

This matches the pattern the ESLint block already uses (lines 28–31) and prevents prettier from hanging when no files are listed.

@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next--components--hyperspell branch from 53e88d4 to 964197b Compare May 13, 2026 15:31
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next--components--hyperspell branch from 964197b to efee314 Compare May 13, 2026 19:31
// line as the type declaration, which doesn't work. So we convert to // @ts-ignore
// on its own line to properly suppresses errors.
if (file.endsWith('.d.ts') || file.endsWith('.d.mts') || file.endsWith('.d.cts')) {
transformed = transformed.replace(/\/\*\* @ts-ignore\b[^*]*\*\/ /gm, '// @ts-ignore\n');
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAJOR BUG ts-ignore replacement changes character count, breaking declaration maps

The existing replacement explicitly preserves character count to avoid breaking source maps, but this replacement converts /** @ts-ignore */ (18 chars, same line) to // @ts-ignore\n (15 chars + new line), corrupting offsets in the .d.ts.map files that declarationMap: true emits.

Prompt to fix with AI

Copy this prompt into your AI coding assistant to fix this issue.

In `scripts/utils/postprocess-files.cjs`, line 36, the replacement `transformed.replace(/\/\*\* @ts-ignore\b[^*]*\*\/ /gm, '// @ts-ignore\n')` changes the character count and inserts a new line, which breaks `.d.ts.map` declaration maps (the project has `declarationMap: true` in tsconfig.build.json). The sibling replacement at line 29 explicitly preserves character count to avoid this. Fix by padding the replacement to the same length as the match, e.g.: `transformed.replace(/\/\*\* @ts-ignore\b[^*]*\*\/ /gm, (match) => '// @ts-ignore' + '\n' + ' '.repeat(match.length - 14))` — or by restructuring so the `@ts-ignore` line replaces its content but the line count and subsequent offsets are preserved.

@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next--components--hyperspell branch from efee314 to 1d3589f Compare May 15, 2026 09:31
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next--components--hyperspell branch from 1d3589f to 97d3e1f Compare May 18, 2026 23:31
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next--components--hyperspell branch from 97d3e1f to 5704a81 Compare May 19, 2026 03:21
Comment on lines 44 to +47
pnpm tsn scripts/publish-packages.ts "{ \"paths_released\": \"$PATHS_RELEASED\" }"
env:
INPUT_PATH: ${{ github.event.inputs.path }}
NPM_TOKEN: ${{ secrets.HYPERSPELL_NPM_TOKEN || secrets.NPM_TOKEN }}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAJOR RELIABILITY publish-npm.yml skips NPM_TOKEN validation that bin/publish-npm previously enforced

bin/publish-npm previously had an inline guard that printed a clear error and exited if NPM_TOKEN was unset and OIDC was unavailable. The new bin/publish-npm drops that guard entirely and unconditionally calls npm config set ... "$NPM_TOKEN". The validation was moved to bin/check-release-environment (called only from release-doctor.yml), but publish-npm.yml never calls check-release-environment. If either secret (HYPERSPELL_NPM_TOKEN/NPM_TOKEN) is missing, GitHub Actions resolves the expression to "", so the publish job builds all packages, installs deps, and then fails late at pnpm publish with a cryptic npm auth error instead of the fast, descriptive message.

Prompt to fix with AI

Copy this prompt into your AI coding assistant to fix this issue.

Add a step in `.github/workflows/publish-npm.yml` before 'Publish to NPM' that runs `bash ./bin/check-release-environment` with `env: NPM_TOKEN: ${{ secrets.HYPERSPELL_NPM_TOKEN || secrets.NPM_TOKEN }}`, so the workflow fails fast with a descriptive error if the secret is missing rather than failing late at npm auth after building all packages.

@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next--components--hyperspell branch from 5704a81 to 22d7a0b Compare May 20, 2026 17:31
Comment thread bin/publish-npm
echo "ERROR: NPM_TOKEN must be set if not running in a Github Action with id-token permission"
exit 1
fi
npm config set '//registry.npmjs.org/:_authToken' "$NPM_TOKEN"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAJOR RELIABILITY NPM_TOKEN empty-string not caught; check moved out of publish path

bin/publish-npm removed its inline NPM_TOKEN guard and now unconditionally calls npm config set with "$NPM_TOKEN". publish-npm.yml sets NPM_TOKEN from secrets with a || fallback; when both secrets are absent it evaluates to empty string (not unset), so bash's -u guard never fires, the auth token is set to "", and the publish silently fails at npm with an opaque auth error. The only [ -z "${NPM_TOKEN}" ] check lives in bin/check-release-environment, which is only invoked by release-doctor.yml (triggered on PRs, not on publish events).

Prompt to fix with AI

Copy this prompt into your AI coding assistant to fix this issue.

Add an explicit NPM_TOKEN check to `publish-npm.yml` before the publish step, OR add `if [ -z "${NPM_TOKEN:-}" ]; then echo 'ERROR: NPM_TOKEN must be set'; exit 1; fi` at the top of `bin/publish-npm` (replacing the unconditional set) so the publish job itself fails fast with a clear message when both secrets are unset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants